import { EntityPartType, THREE } from '@amcax/web-render';

// -------
//获取拾取对象的id、法向
export enum StateEnum {
  ALL = 'all',
  ID = 'id',
  NORMAL = 'normal',
}
export type StateType = StateEnum.ALL | StateEnum.ID | StateEnum.NORMAL;
export type RetType = {
  normal?: string[] | THREE.Vector3Tuple[];
  id?: string;
  vertexs?: THREE.Vector3Tuple[];
};
// --------------Base----------------------
export enum udEnum {
  u = 'ratio',
  distance = 'distance',
}
export type uParam = {
  ratio: number;
  distance: number;
  mode: udEnum;
};
export type InitType = {
  enableBoxSelect?: boolean;
  entityPartType?: EntityPartType;
};
export enum TempPointId {
  moveid = 'moveid',
  pickPoint = 'pickPointId',
}
export const longPressThreshold = 150;
export enum LabelEnum {
  label = 'label',
  inputLabel = 'inputLabel',
  inputLabelTwo = 'inputLabelTwo',
  extra = 'extra',
}

export const EntityTitleMap = {
  [EntityPartType.point]: '点',
  [EntityPartType.spatialPoint]: '空间点',
  [EntityPartType.hotPoint]: '硬点',
  [EntityPartType.pointCloud]: '点云',
  [EntityPartType.line]: '线',
  [EntityPartType.spatialLine]: '空间线',
  [EntityPartType.singleLine]: '单边',
  [EntityPartType.doubleLine]: '双边',
  [EntityPartType.tripleLine]: '多边',
  [EntityPartType.face]: '面',
  [EntityPartType.solid]: '体',
  [EntityPartType.node]: '节点',
  [EntityPartType.element]: '单元',
  [EntityPartType.all]: '所有',
  [EntityPartType.shellElement]: '壳单元',
  [EntityPartType.solidElement]: '体单元',
  [EntityPartType.feature]: '特征',
};
